package com.cskaoyan.controller.admin;

import com.cskaoyan.bean.*;
import com.cskaoyan.service.LogService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @PROJECT_NAME: market_34th
 * @DESCRIPTION:
 * @Author: qiu
 * @DATE: 2021/10/19 21:32
 */
@RestController
@RequestMapping("/admin/log")
public class LogController {

    @Autowired
    LogService logService;

    /**
     * 操作日志分页
     * @param name
     * @param param
     * @return
     */
    @RequiresPermissions("admin:log:list")
    @GetMapping("/list")
    public BaseRespVo list(String name, BaseParam param) {
        BasePageData<Log> data = logService.list(name, param);

        return BaseRespVo.ok(data);
    }
}